﻿@model IEnumerable<VMFactory.Api.Data.Models.VMOutput>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.VMTemplate.UniqueName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.VMRequest.DisplayName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FileName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DownloadUrl)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Log)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CreatedOn)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.LastModified)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.VMTemplate.UniqueName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VMRequest.DisplayName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FileName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DownloadUrl)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Log)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedOn) UTC
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastModified) UTC
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
